/* 验证 */
import {codeVerify, requiredVerify, mailNumber, checkPass} from './verify'

export const loginRules = {
  loginName: [
    requiredVerify('账号'),
    codeVerify()
  ],
  password: [
    requiredVerify('密码')
  ]
}
export const mailRules = {
  mail: [requiredVerify('邮箱'), mailNumber()]
}
export const passCheckRules = (pass1) => {
  return {
    loginName: [requiredVerify('账号'), codeVerify()],
    password: [requiredVerify('密码'), codeVerify()],
    passwordCheck: [requiredVerify('密码再一次'), checkPass(pass1)]
  }
}
export const passCheckFirstRules = {
  loginName: [requiredVerify('账号'), codeVerify()],
  password: [requiredVerify('密码'), codeVerify()]
}
